<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>申报清单信息--详情展示</title>
    <%@include file="/WEB-INF/pages/common/taglib.jsp" %>
    <%@include file="/WEB-INF/pages/common/common.jsp" %>
    <%--<style>--%>
        <%--.table3 tr {--%>
            <%--height: 40px;--%>
            <%--line-height: 40px;--%>
            <%--border: 1px #ccc solid--%>
        <%--}--%>
    <%--</style>--%>
</head>
<body>
<div class="content content_frame">
    <h3 class="mainTitle"><img src="${basePath}/images/icon2.png"/>申报清单信息</h3>
    <br/>
    <ul class="contentNav dib-wrap">
        <li class="dib">
            <a onclick="javascript:history.go(-1)">
                <i class='fa fa-reply'></i>&nbsp;&nbsp;返&nbsp;回 </a>
        </li>
    </ul>
    <br/>
    <input type="hidden" name="id" value="${declHead.id}">
    <table class="table3">
        <tr>
            <th colspan="4">清单表头信息</th>
        </tr>
        <tr>
            <td width="15%">申报单号</td>
            <td width="35%">
                <label>${declHead.declno}</label>
            </td>
            <td>物流运单号/邮件号</td>
            <td>
                <label>${declHead.postalno}</label>
            </td>
        </tr>
        <tr>
            <td>邮件流水号</td>
            <td>
                <label>${declHead.poserialno}</label>
            </td>
            <td width="15%">快件流水号</td>
            <td width="35%">
                <label>${declHead.faserialno}</label>
            </td>
        </tr>
        <tr>
            <td>订单号</td>
            <td>
                <label>${declHead.orderno}</label>
            </td>
            <td>总运单号</td>
            <td>
                <label>${declHead.mainwbno}</label>
            </td>
        </tr>
        <tr>
            <td>申报日期</td>
            <td>
                <label>${declHead.decldate}</label>
            </td>
            <td>进出境日期</td>
            <td>
                <label>${declHead.impexpdate}</label>
            </td>
        </tr>
        <tr>
            <td>进出境标志</td>
            <td>
                <label>${'E' eq declHead.impexpflag?'出口':'进口'}</label>
            </td>
            <td>申报单位代码</td>
            <td>
                <label>${declHead.entcode}</label>
            </td>
        </tr>
        <tr>
            <td>申报单位名称</td>
            <td>
                <label>${declHead.entname}</label>
            </td>
            <td>电商企业代码</td>
            <td>
                <label>${declHead.cbecode}</label>
            </td>
        </tr>
        <tr>
            <td>电商企业名称</td>
            <td>
                <label>${declHead.cbename}</label>
            </td>
            <td>物流企业代码</td>
            <td>
                <label>
                    ${declHead.logisticscode}
                </label>
            </td>
        </tr>
        <tr>
            <td>物流企业名称</td>
            <td>
                <label>
                    ${declHead.logisticsname}
                </label>
            </td>
            <td>电商平台代码</td>
            <td>
                <label>${declHead.ecpcode}</label>
            </td>
        </tr>
        <tr>
            <td>电商平台名称</td>
            <td>
                <label>${declHead.ecpname}</label>
            </td>
            <td>监管机构代码</td>
            <td>
                <label>${declHead.orgcode}</label>
            </td>
        </tr>
        <tr>
            <td>启运国代码</td>
            <td>
                <label>${declHead.origincodeDisplay}</label>
            </td>
            <td>运输工具</td>
            <td>
                <label>${declHead.transtypecodeDisplay}</label>
            </td>
        </tr>
        <tr>
            <td>运输号码</td>
            <td>
                <label>${declHead.transtypeno}</label>
            </td>
            <td>件数</td>
            <td>
                <label>
                    ${declHead.quantity}
                </label>
            </td>
        </tr>
        <tr>
            <td>毛重</td>
            <td>
                <label>${declHead.grossweight}</label>
            </td>
            <td>净重</td>
            <td>
                <label>${declHead.netweight}</label>
            </td>
        </tr>
        <%--<tr>--%>
            <%--&lt;%&ndash;<td>包装类型</td>&ndash;%&gt;--%>
            <%--&lt;%&ndash;<td>&ndash;%&gt;--%>
                <%--&lt;%&ndash;<label>${declHead.pkgscode}</label>&ndash;%&gt;--%>
            <%--&lt;%&ndash;</td>&ndash;%&gt;--%>
            <%--<td>货币单位</td>--%>
            <%--<td>--%>
                <%--<label>${declHead.origincurrencyDisplay}</label>--%>
            <%--</td>--%>
        <%--</tr>--%>
        <tr>
            <td>收件人</td>
            <td>
                <label>${declHead.recvername}</label>
            </td>
            <td>收件人证件类型</td>
            <td>
                <label>${'1' eq declHead.recveridtype?'身份证':'其他'}</label>
            </td>
        </tr>
        <tr>
            <td>收件人证件号码</td>
            <td>
                <label>${declHead.recveridcard}</label>
            </td>
            <td>收件人电话</td>
            <td>
                <label>${declHead.recvertel}</label>
            </td>
        </tr>
        <tr>
            <td>收件人地址</td>
            <td>
                <label>${declHead.recveraddress}</label>
            </td>
            <td>抵运港代码</td>
            <td>
                <label>${declHead.arrivedportcode}</label>
            </td>
        </tr>
        <tr>
            <td>区内企业代码</td>
            <td>
                <label>${declHead.areacode}</label>
            </td>
            <td>区内企业名称</td>
            <td>
                <label>${declHead.areaname}</label>
            </td>
        </tr>
        <tr>
            <td>口岸代码</td>
            <td>
                <label>${declHead.portcode}</label>
            </td>
            <td>监管场所代码</td>
            <td>
                <label>${declHead.loctno}</label>
            </td>
        </tr>
        <tr>
            <td>运输方式</td>
            <td>
                <label>${declHead.trafmode}</label>
            </td>
            <td>订购人姓名</td>
            <td>
                <label>${declHead.recveridname}</label>
            </td>
        </tr>
        <tr>
            <td>订购人电话</td>
            <td>
                <label>${declHead.recveridtelephone}</label>
            </td>
            <td></td>
            <%--申报类型--%>
            <td>
                <%--<label>${'1' eq declHead.apptype?'新增':'2' eq declHead.apptype?'变更':'3' eq declHead.apptype?'删除':''}</label>--%>
            </td>
        </tr>
        <tr>
            <td>许可证号</td>
            <td>
                <label>${declHead.licenseno}</label>
            </td>
            <td>运费</td>
            <td>
                <label>${declHead.freight}</label>
            </td>
        </tr>
        <tr>
            <td>保费</td>
            <td>
                <label>${declHead.insuredfee}</label>
            </td>
            <td>原寄局</td>
            <td>
                <label>${declHead.sendoffice}</label>
            </td>
        </tr>
        <tr>
            <td>寄达局</td>
            <td>
                <label>${declHead.receiveoffice}</label>
            </td>
            <td>状态</td>
            <td>
                <label>${declHead.statusDisplay}</label>
            </td>
        </tr>
        <tr>
            <td>状态时间</td>
            <td>
                <label>${declHead.statusTime}</label>
            </td>
            <td>创建时间</td>
            <td>
                <label>${declHead.createTime}</label>
            </td>
        </tr>
        <tr>
            <td>操作员ID</td>
            <td>
                <label>${declHead.operId}</label>
            </td>
            <td>组织机构代码</td>
            <td>
                <label>${declHead.orgId}</label>
            </td>
        </tr>
        <tr>
            <td>主要商品名称</td>
            <td>
                <label>${declHead.prodNameCn}</label>
            </td>
            <td>货币单位</td>
            <td>
                <label>${declHead.origincurrencyDisplay}</label>
            </td>
        </tr>
        <tr>
            <td>备注</td>
            <td colspan="3">${declHead.remark}</td>
        </tr>
    </table>
    <br/>
    <table id="goods_info" class="table3">

    </table>
    <br/>
    <table id="corptable">
    </table>
    <div id="corptablePage">
    </div>
    <br/>
</div>
<script type="text/javascript">
    $(function () {
        showCbecElistItem('null');
        $(".table3 td:even").css("background-color", "#f5f5f5");

        $("#corptable").jqGrid({
            datatype: "json",
            url: "${basePath}/declareDetailInsp/queryTGoodsListInspList?relatedId=${id}",
            colNames: ['ID', '序号', 'HS编码', '商品备案号', '快件包裹流水号', '商品中文名称', '创建时间', '备注'],
            colModel: [{name: 'id', index: 'id', hidden: true},
                {name: 'goodsno', index: 'goodsno', width: 40},
                {name: 'hscode', index: 'hscode'},
                {name: 'goodsregno', index: 'goodsregno'},
                {name: 'fagoodsserialno', index: 'fagoodsserialno'},
                {name: 'goodscname', index: 'goodscname'},
                {name: 'createTime', index: 'createTime'},
                {name: 'remark', index: 'remark'}],
            viewrecords: true,
            autowidth: true,
            height: 'auto',
            shrinkToFit: false,
            autoScroll: true,
            rowNum: 10, //每页显示记录数
            rowList: [10, 20, 100], //可调整每页显示的记录数
            rownumbers: true,
            rownumWidth: 15,
//            multiselect: true,
            pager: "#corptablePage", //分页工具栏
            sortname: "",
            sortorder: "desc",
            loadComplete: function () {
                var rowNum = $(this).jqGrid('getGridParam', 'records');
                if (rowNum <= 0) {
                    if ($(this).parent().children('.norecords').length == 0)
                        $(this).parent().append("<div class=\"norecords\">暂无数据！</div>");
                    $(this).parent().children('.norecords').show();
                } else {
                    $(this).parent().children('.norecords').hide();
                }

                $(".ui-jqgrid tr.ui-row-ltr td").css('text-align', 'center');
            },
            ondblClickRow: function (rowid) {
                showCbecElistItem($("#corptable").jqGrid('getRowData', rowid).id);
            }
        });
    });

    function showCbecElistItem(id) {
        $("#goods_info").load('${basePath}/declareDetailInsp/loadDeclareBodyDetail', {id: id}, function () {
        });
    }
</script>
</body>
</html>

